<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibDriver MPU9250: example/driver_mpu9250_basic.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="doxygen.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibDriver MPU9250
   &#160;<span id="projectnumber">1.0.0</span>
   </div>
   <div id="projectbrief">MPU9250 full-featured driver</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('driver__mpu9250__basic_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">driver_mpu9250_basic.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="driver__mpu9250__basic_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#ifndef DRIVER_MPU9250_BASIC_H</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#define DRIVER_MPU9250_BASIC_H</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160; </div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="driver__mpu9250__interface_8h.html">driver_mpu9250_interface.h</a>&quot;</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160; </div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span>{</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160; </div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#ga6b511d9065719f916766e04a5f9c3d6d">   56</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_CLOCK_SOURCE                   MPU9250_CLOCK_SOURCE_PLL                  </span></div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#gaac2df48f34051acc9eaceddb3ef8357a">   57</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_RATE                           50                                        </span></div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#ga9639e25dc8f6ed6ffd1ea1b7b5633de2">   58</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_LOW_PASS_FILTER                MPU9250_LOW_PASS_FILTER_3                 </span></div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#ga1f15e0212920ca83ead93049f46fc04b">   59</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_CYCLE_WAKE_UP                  MPU9250_BOOL_FALSE                        </span></div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#ga6c1807ed9bfbab1f7f6df17f723f860f">   60</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_INTERRUPT_PIN_LEVEL            MPU9250_PIN_LEVEL_LOW                     </span></div>
<div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#gaac7e4fe8bb6d99db7b7b8f1f96747914">   61</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_INTERRUPT_PIN_TYPE             MPU9250_PIN_TYPE_PUSH_PULL                </span></div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#ga445e033218f34847c4ef461d7867f3cd">   62</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_ACCELEROMETER_RANGE            MPU9250_ACCELEROMETER_RANGE_2G            </span></div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#ga3bf3b544e1c6280f281626ac68bc528d">   63</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_GYROSCOPE_RANGE                MPU9250_GYROSCOPE_RANGE_2000DPS           </span></div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#gafaa80d26c0f6d2ce16e3cc42fa997822">   64</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_INTERRUPT_MOTION               MPU9250_BOOL_FALSE                        </span></div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#gad7f4ebcc092057389e45458a07739eeb">   65</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_INTERRUPT_FIFO_OVERFLOW        MPU9250_BOOL_FALSE                        </span></div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#gab2b4fa6721211244f87f354094a7edcf">   66</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_INTERRUPT_DMP                  MPU9250_BOOL_FALSE                        </span></div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#gae297d8ea316b33e96a96b0f722f365c8">   67</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_INTERRUPT_FSYNC_INT            MPU9250_BOOL_FALSE                        </span></div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#gaaaca8498b454720061b5eeb409c98836">   68</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_INTERRUPT_DATA_READY           MPU9250_BOOL_FALSE                        </span></div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#ga0b6cedfdc171ca562dff4d8402082ca3">   69</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_INTERRUPT_LATCH                MPU9250_BOOL_TRUE                         </span></div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#ga49fdb836b1375b32edb66f00a1587abf">   70</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_INTERRUPT_READ_CLEAR           MPU9250_BOOL_TRUE                         </span></div>
<div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#gafbc5f1e4d7ca2978acba89a490ef185a">   71</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_EXTERN_SYNC                    MPU9250_EXTERN_SYNC_INPUT_DISABLED        </span></div>
<div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#ga263f2747df83f9e6085bf25f08c265e6">   72</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_FSYNC_INTERRUPT                MPU9250_BOOL_FALSE                        </span></div>
<div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#gadbd107461ad3f676cd53d1cbc92a6f86">   73</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_FSYNC_INTERRUPT_LEVEL          MPU9250_PIN_LEVEL_LOW                     </span></div>
<div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#gaf2cd4447b8864caa9aadc5391fc09ebc">   74</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_IIC_MASTER                     MPU9250_BOOL_FALSE                        </span></div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#gade942e5910d9d33055914fa9c6911098">   75</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_IIC_BYPASS                     MPU9250_BOOL_FALSE                        </span></div>
<div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#gaf8dee0fb1f6a756ee04a9b972d4c3eff">   76</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_GYROSCOPE_STANDBY              MPU9250_BOOL_FALSE                        </span></div>
<div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#gaf2adf4900684f60b6f0c0b78600fda38">   77</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_FIFO_MODE                      MPU9250_FIFO_MODE_NORMAL                  </span></div>
<div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#ga4869f9b1d947060c93914df392b72564">   78</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_GYROSCOPE_CHOICE               0                                         </span></div>
<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#ga3db64c59124e759defa21875b970d94f">   79</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_ACCELEROMETER_CHOICE           0                                         </span></div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#gac44a4ef61f167f972dd0ce861b5348ba">   80</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_ACCELEROMETER_LOW_PASS_FILTER  MPU9250_ACCELEROMETER_LOW_PASS_FILTER_3   </span></div>
<div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#ga23c7d164f1559a56c24979118c80d58a">   81</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_LOW_POWER_ACCEL_OUTPUT_RATE    MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_62P50 </span></div>
<div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#ga7585e7c68b25606d56e36dbca42e36e7">   82</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_WAKE_ON_MOTION                 MPU9250_BOOL_FALSE                        </span></div>
<div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#ga3ab04f1c63c8abe1ba3c027fd4c83329">   83</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_ACCELEROMETER_COMPARE          MPU9250_BOOL_TRUE                         </span></div>
<div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#ga8d1c3ce5cbab7c9c08920ace6fad450f">   84</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_MAGNETOMETER_MODE              MPU9250_MAGNETOMETER_MODE_CONTINUOUS2     </span></div>
<div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="group__mpu9250__example__driver.html#gabf6c2d5d094db00c469a532c738e4f1e">   85</a></span>&#160;<span class="preprocessor">#define MPU9250_BASIC_DEFAULT_MAGNETOMETER_BITS              MPU9250_MAGNETOMETER_BITS_16              </span></div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;uint8_t <a class="code" href="group__mpu9250__example__driver.html#ga6558a4dc3f25faccfaee646959a4a311">mpu9250_basic_init</a>(<a class="code" href="group__mpu9250__basic__driver.html#ga7d9cf66109326149ba40c8bee86e12c6">mpu9250_interface_t</a> interface, <a class="code" href="group__mpu9250__basic__driver.html#ga51224d8bd81cd18f40f52a6b0d44bc85">mpu9250_address_t</a> addr_pin);</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160; </div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;uint8_t <a class="code" href="group__mpu9250__example__driver.html#ga17b35fa9849958941ec9ccad7b229280">mpu9250_basic_deinit</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160; </div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;uint8_t <a class="code" href="group__mpu9250__example__driver.html#gaf975cc9af81a6b611bd241eeb1f0d397">mpu9250_basic_read</a>(<span class="keywordtype">float</span> g[3], <span class="keywordtype">float</span> dps[3], <span class="keywordtype">float</span> ut[3]);</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160; </div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;uint8_t <a class="code" href="group__mpu9250__example__driver.html#ga8029e1e05a66c8e3b909772019c402ec">mpu9250_basic_read_temperature</a>(<span class="keywordtype">float</span> *degrees);</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160; </div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;}</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160; </div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="ttc" id="adriver__mpu9250__interface_8h_html"><div class="ttname"><a href="driver__mpu9250__interface_8h.html">driver_mpu9250_interface.h</a></div><div class="ttdoc">driver mpu9250 interface header file</div></div>
<div class="ttc" id="agroup__mpu9250__basic__driver_html_ga51224d8bd81cd18f40f52a6b0d44bc85"><div class="ttname"><a href="group__mpu9250__basic__driver.html#ga51224d8bd81cd18f40f52a6b0d44bc85">mpu9250_address_t</a></div><div class="ttdeci">mpu9250_address_t</div><div class="ttdoc">mpu9250 address enumeration definition</div><div class="ttdef"><b>Definition:</b> <a href="driver__mpu9250_8h_source.html#l00071">driver_mpu9250.h:72</a></div></div>
<div class="ttc" id="agroup__mpu9250__basic__driver_html_ga7d9cf66109326149ba40c8bee86e12c6"><div class="ttname"><a href="group__mpu9250__basic__driver.html#ga7d9cf66109326149ba40c8bee86e12c6">mpu9250_interface_t</a></div><div class="ttdeci">mpu9250_interface_t</div><div class="ttdoc">mpu9250 interface enumeration definition</div><div class="ttdef"><b>Definition:</b> <a href="driver__mpu9250_8h_source.html#l00062">driver_mpu9250.h:63</a></div></div>
<div class="ttc" id="agroup__mpu9250__example__driver_html_ga17b35fa9849958941ec9ccad7b229280"><div class="ttname"><a href="group__mpu9250__example__driver.html#ga17b35fa9849958941ec9ccad7b229280">mpu9250_basic_deinit</a></div><div class="ttdeci">uint8_t mpu9250_basic_deinit(void)</div><div class="ttdoc">basic example deinit</div><div class="ttdef"><b>Definition:</b> <a href="driver__mpu9250__basic_8c_source.html#l00717">driver_mpu9250_basic.c:717</a></div></div>
<div class="ttc" id="agroup__mpu9250__example__driver_html_ga6558a4dc3f25faccfaee646959a4a311"><div class="ttname"><a href="group__mpu9250__example__driver.html#ga6558a4dc3f25faccfaee646959a4a311">mpu9250_basic_init</a></div><div class="ttdeci">uint8_t mpu9250_basic_init(mpu9250_interface_t interface, mpu9250_address_t addr_pin)</div><div class="ttdoc">basic example init</div><div class="ttdef"><b>Definition:</b> <a href="driver__mpu9250__basic_8c_source.html#l00050">driver_mpu9250_basic.c:50</a></div></div>
<div class="ttc" id="agroup__mpu9250__example__driver_html_ga8029e1e05a66c8e3b909772019c402ec"><div class="ttname"><a href="group__mpu9250__example__driver.html#ga8029e1e05a66c8e3b909772019c402ec">mpu9250_basic_read_temperature</a></div><div class="ttdeci">uint8_t mpu9250_basic_read_temperature(float *degrees)</div><div class="ttdoc">basic example read temperature</div><div class="ttdef"><b>Definition:</b> <a href="driver__mpu9250__basic_8c_source.html#l00649">driver_mpu9250_basic.c:649</a></div></div>
<div class="ttc" id="agroup__mpu9250__example__driver_html_gaf975cc9af81a6b611bd241eeb1f0d397"><div class="ttname"><a href="group__mpu9250__example__driver.html#gaf975cc9af81a6b611bd241eeb1f0d397">mpu9250_basic_read</a></div><div class="ttdeci">uint8_t mpu9250_basic_read(float g[3], float dps[3], float ut[3])</div><div class="ttdoc">basic example read</div><div class="ttdef"><b>Definition:</b> <a href="driver__mpu9250__basic_8c_source.html#l00672">driver_mpu9250_basic.c:672</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_cfafba98a580ce4b62f8a6fa96d7cbb0.html">example</a></li><li class="navelem"><a class="el" href="driver__mpu9250__basic_8h.html">driver_mpu9250_basic.h</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
